<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        #app{
            width: 400px;
            height: 400px;
            background:pink;
            margin:50px auto;
            position: relative;
        }
        button{
            width: 50px;
            height: 25px;
        }
        .btnAtive{
            background: red;
            color: #fff;
        }
        .container,.wrap{
           position: absolute;
           left: 0;
           bottom: 0;
           background:red;
           width: 400px;
           height: 300px;
        }
        img{
            width: 400px;
            height: 400px;
        }
        .imgActive{
            display:block;
        
        }
            </style>
</head>
<body>
    <div id="app">
        <button v-for="(item,index) in btn"  :class="activeIndex==index?'btnAtive':''"  @click="Toggle(index)">{{ item }}</button>
        <div class="container">
                <div class="wrap" >
                    <img v-show="index == 0" src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2307228589,1892115804&fm=11&gp=0.jpg"   alt="" >  
                    <img  v-show="index == 1" src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1274350153,911383344&fm=11&gp=0.jpg"   alt="" >  
                    <img v-show="index == 2" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3727180135,1795523723&fm=11&gp=0.jpg"   alt="" >  
                </div>
        </div>
    </div>
    <script src="/vue.js"></script>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                btn:["第一张","第二张","第三张"],
                activeIndex:0,
                 index:0
            },
            methods:{
                Toggle(index){
                this.activeIndex = index;
                this.index=index;
                
            }
            }
        })
    </script>
</body>
</html>